package com.input4hua.visitor.visitor;

import com.input4hua.visitor.element.ElementImp1;
import com.input4hua.visitor.element.ElementImp2;

/**
 * Created by jiahua.hu on 2019/2/16.
 */
public class Visitor implements IVisitor {
    @Override
    public void visit(ElementImp1 element) {
        element.doSomething();
    }

    @Override
    public void visit(ElementImp2 element) {
        element.doSomething();
        System.out.println("el2 do next");
    }
}
